package schoolDemo3;
//这里我选择继承CyLinder7_5类中的成员方法
class CyLinder7_6 extends CyLinder7_5{
    private double radius;
    private int height;
    private double pi=3.14;
    String color;

    public CyLinder7_6(){
        this(4.5,7,"蓝色");
        System.out.println("无参数的构造方法被调用了！");
    }
    public CyLinder7_6(double r,int h,String c){
        System.out.println("有参构造方法被调用了！");
         radius = r;
         height=h;
         color=c;
    }
    public void show(){
        System.out.println("圆柱底半径为："+radius);
        System.out.println("圆柱体的高是："+height);
        System.out.println("圆柱的颜色为："+color);
        System.out.println("圆柱底面积为："+area());
        System.out.println("圆柱体积为："+volume());
    }
}
public class App7_6 {
    public static void main(String[] args)
    {
        new CyLinder7_6().show();
    }
}